Skip to content

Internal Variable Substitution#181

Open
rcosta358 wants to merge 5 commits intomainfrom
substitute-internal-vars
Open

Internal Variable Substitution#181
rcosta358 wants to merge 5 commits intomainfrom
substitute-internal-vars

Conversation

@rcosta358
Copy link
Copy Markdown
Collaborator

@rcosta358 rcosta358 commented Mar 17, 2026

Partially covers #162, by substituting internal variables (e.g., #b_1) with user facing variables (e.g., b), which results in simpler expressions, even without the full constraint simplification. Also, when an internal variable equals another internal variable, the lower-counter variable is substituted with the higher-counter one.

Example

Before

No expansions:

image

After

Before expanding:

image

After expanding:

image

@rcosta358 rcosta358 changed the title Substitute internal vars Substitute Internal with User-Facing Variables Mar 17, 2026
@rcosta358 rcosta358 self-assigned this Mar 17, 2026
@rcosta358 rcosta358 added enhancement New feature or request simplification Related to the simplification of expressions labels Mar 17, 2026
@rcosta358 rcosta358 changed the base branch from main to misleading-expansions March 17, 2026 11:58
@rcosta358 rcosta358 changed the title Substitute Internal with User-Facing Variables Internal Variable Substitution Mar 17, 2026
@rcosta358 rcosta358 force-pushed the substitute-internal-vars branch from 3f184df to cc86f95 Compare March 18, 2026 16:12
@rcosta358 rcosta358 changed the base branch from misleading-expansions to main March 18, 2026 16:13
Copy link
Copy Markdown
Collaborator

@CatarinaGamboa CatarinaGamboa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start of the symb propagation algorithm! Just check if the origins are all that they are supposed to in a follow-up pr.
The example was:
b_7 == a_ 3 && a_3 + 1 > 0 : this has origin but
b_7 == a_ 3 && b_7 + 1 > 0 : this does not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request simplification Related to the simplification of expressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants